package com.psl.action.frameAction;

import com.psl.model.userlogin;
import com.psl.services.frame.LoginServices;
import org.apache.struts2.ServletActionContext;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

public class changepw
{
  public String execute()
  {
    HttpSession session = ServletActionContext.getRequest().getSession();
    HttpServletRequest request = ServletActionContext.getRequest();
    userlogin userinfo = (userlogin)session.getAttribute("user");
    String password = request.getParameter("password");
    LoginServices ls = new LoginServices();
    ls.cpw(userinfo.getUserID(), password);
    return "success";
  }
}
